﻿Imports System.Runtime.CompilerServices

Friend Module ValidationExtensions
    Private Const _stringRequiredErrorMessage As String = "Value cannot be null or empty."

    <Extension()>
    Public Sub FailIfEmpty(ByVal value As String, ByVal parameterName As String)
        If String.IsNullOrEmpty(value) Then
            Throw New ArgumentException(_stringRequiredErrorMessage, parameterName)
        End If
    End Sub
End Module
